/*
	This file is part of Floculate.
	Copyright (C) 2008  Bill Whitacre

	Floculate is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Floculate is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef DRAW_H
#define DRAW_H

#include <stdlib.h>
#include <math.h>

#if defined(__APPLE__)
#	include <OpenGL/gl.h>
#else
#	include <GL/gl.h>
#endif

#ifndef MATH_PI
#	ifndef M_PI
#		define MATH_PI 3.14159f
#	else
#		define MATH_PI M_PI
#	endif
#endif

#ifdef __cplusplus
extern "C" {
#endif

extern int rat_pretty_draw;

void rat_line_width(float width);
void rat_point_size(float size);
void rat_set_color(float r,float g,float b,float a);
void rat_get_color(float *r,float *g,float *b,float *a);

void rat_draw_point(float x,float y);
void rat_draw_points(float *points,unsigned int numpts);
void rat_draw_line(float x1,float y1,float x2,float y2);
void rat_draw_lines(float *points,unsigned int numpts);
void rat_draw_line_strip(float *points,unsigned int numpts);
void rat_draw_line_loop(float *points,unsigned int numpts);
void rat_draw_quads(float *points,unsigned int numpts);
void rat_draw_triangles(float *points,unsigned int numpts);
void rat_draw_triangle_fan(float *points,unsigned int numpts);
void rat_draw_triangle_strip(float *points,unsigned int numpts);

void rat_draw_rect(float x1,float y1,float x2,float y2,int fill);
void rat_draw_circle(float x,float y,float radius,float stepdivisor,int fill);
void rat_draw_elipse(float x,float y,float rx,float ry,float stepdivisor,int fill);

#ifdef __cplusplus
}
#endif

#endif
